﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TogheterWeBuyIt.Models.CreatePromocaoModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Criar promoção
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script language="javascript" type="text/javascript" 
src="<%=Url.Content("~/Scripts/MicrosoftAjax.js") %>"></script>
<script language="javascript" type="text/javascript" 
src="<%=Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>"></script>
    <h2>Criar promoção</h2>
    <br />

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
            
            <table style="border-width:0" align="center" width="95%">

            <tr >
                <td><%= Html.Label("Descrição") %></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.Descricao)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.Descricao)%></td>
                <td rowspan="6"><asp:Panel ScrollBars="Auto" runat="server" style="height:200px;" ><% Html.RenderPartial("Controls/UProductsList", Model.Produtos); %></asp:Panel></td>
            </tr>
            <tr>
                <td><%= Html.Label("Início validade")%></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.DataValidadeInicio)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.DataValidadeInicio)%></td>
            </tr>
            <tr>
                <td><%= Html.Label("Fim validade")%></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.DataValidadeFim)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.DataValidadeFim)%></td>
            </tr>
            <tr>
                <td><%= Html.Label("Qtd mínima de pessoas")%></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.ClientesMin)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.ClientesMin)%></td>
            </tr>
            <tr>
                <td><%= Html.Label("Qtd máxima de pessoas")%></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.ClientesMax)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.ClientesMax)%></td>
            </tr>
            <tr>
                <td><%= Html.Label("Link")%></td>
                <td><%= Html.TextBoxFor(model => model.Promocao.Link)%>
                <%= Html.ValidationMessageFor(model => model.Promocao.Link)%></td>
            </tr>
            </table>
 
            <p>
            <br />
                <input type="submit" value="Criar" />
            </p>

    <% } %>

    
</asp:Content>

